package com.usian.user.feign;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * ClassName: WemediaFeign
 * Author:   WGG
 * Date:    2022-11-2022/11/14-20:04
 * Version: 1.0
 * Description:
 */
@FeignClient("leadnews-wemedia")
public interface WemediaFeign {

    /**
     * 根据名称查询自媒体人
     * @param name
     * @return
     */
    @PostMapping("/wemedia/api/v1/findByName/{name}")
    public WmUser findByName(@PathVariable String name);

    /**
     * 添加自媒体人
     * @param wmUser
     * @return
     */
    @PostMapping("/wemedia/api/v1/save")
    public ResponseResult save(@RequestBody WmUser wmUser);
}
